using UnityEngine;
using System.Collections;

public class EnemyBlackHeart : Enemy {
	public Material redMaterial;
	
	// Use this for initialization
    void Start()
    {
		if (GlobalState.isRedHero) {
		} else {
			renderer.material = redMaterial;
		}
		
        InitializeAnimationList();
        AddAnimation("running", 0, 0, 3, runningAnimationSpeed);
        AddAnimation("attacking", 2, 0, 4, attackingAnimationSpeed);
        AddAnimation("idle", 0, 0, 3, idleAnimationSpeed);
        AddAnimation("dying", 1, 0, 3, dyingAnimationSpeed);

        StartAnimation("idle", true);

        //Ugh, inheritance problems, copying damagable::start...
        currentHP = totalHP;
	}

    public override void DoDamage(int damage)
    {
        base.DoDamage(damage);
        if (isDamagable && currentHP > 0)
            SoundEffects.instance.playBossDamage();
    }

    protected override void Die()
    {
        SoundEffects.instance.playBossDefeated();
        base.Die();
    }

}
